Other Classes
The following classes are available globally.
-
See moreDispatchTimer
is a general-purpose wrapper over theDispatchSourceTimer
mechanism in GCD.Declaration
Swift
public class DispatchTimer
-
Feedback Model Object for End Of Route Experience.
Declaration
Swift
@objc open class EndOfRouteFeedback : NSObject
-
The
See moreNavigationEventsManager
is responsible for being the liaison between MapboxCoreNavigation and the Mapbox telemetry framework.Declaration
Swift
@objc(MBNavigationEventsManager) open class NavigationEventsManager : NSObject
-
NavigationLocationManager
is the base location manager which handles permissions and background modes.Declaration
Swift
@objc(MBNavigationLocationManager) open class NavigationLocationManager : CLLocationManager
-
A
NavigationRouteOptions
object specifies turn-by-turn-optimized criteria for results returned by the Mapbox Directions API.NavigationRouteOptions
is a subclass ofRouteOptions
that has been optimized for navigation. Pass an instance of this class into theDirections.calculate(_:completionHandler:)
method.Note
NavigationRouteOptions
is designed to be used with theDirections
andNavigationDirections
classes for specifying routing criteria. To customize the user experience in aNavigationViewController
, use theNavigationOptions
class.Declaration
Swift
@objc(MBNavigationRouteOptions) open class NavigationRouteOptions : RouteOptions
-
A
NavigationMatchOptions
object specifies turn-by-turn-optimized criteria for results returned by the Mapbox Map Matching API.NavigationMatchOptions
is a subclass ofMatchOptions
that has been optimized for navigation. Pass an instance of this class into theDirections.calculateRoutes(matching:completionHandler:).
method.Note: it is very important you specify the
See morewaypoints
for the route. Usually the only two values for thisIndexSet
will be 0 and the length of the coordinates. Otherwise, all coordinates passed through will be considered waypoints.Declaration
Swift
@objc(MBNavigationMatchOptions) open class NavigationMatchOptions : MatchOptions
-
NavigationSettings
provides a wrapper for UserDefaults.Properties are prefixed and before they are stored in UserDefaults.standard.
See moreDeclaration
Swift
@objc(MBNavigationSettings) public class NavigationSettings : NSObject
-
A
NavigationDirections
object provides you with optimal directions between different locations, or waypoints. The directions object passes your request to a built-in routing engine and returns the requested information to a closure (block) that you provide. A directions object can handle multiple simultaneous requests. ARouteOptions
object specifies criteria for the results, such as intermediate waypoints, a mode of transportation, or the level of detail to be returned. In addition toDirections
,NavigationDirections
provides support for offline routing.Each result produced by the directions object is stored in a
See moreRoute
object. Depending on theRouteOptions
object you provide, each route may include detailed information suitable for turn-by-turn directions, or it may include only high-level information such as the distance, estimated travel time, and name of each leg of the trip. The waypoints that form the request may be conflated with nearby locations, as appropriate; the resulting waypoints are provided to the closure.Declaration
Swift
@objc(MBNavigationDirections) public class NavigationDirections : Directions
-
See moreReplayLocationManager
replays an array of locations exactly as they were recorded with the single exception of the location’s timestamp which will be adjusted by interval between locations.Declaration
Swift
@objc(MBReplayLocationManager) open class ReplayLocationManager : NavigationLocationManager
-
The
SimulatedLocationManager
class simulates location updates along a given route.The route will be replaced upon a
See moreRouteControllerDidReroute
notification.Declaration
Swift
@objc(MBSimulatedLocationManager) open class SimulatedLocationManager : NavigationLocationManager
-
A user interface element designed to display the estimated arrival time, distance, and time remaining, as well as give the user a control the cancel the navigation session.
See moreDeclaration
Swift
@IBDesignable @objc(MBBottomBannerViewController) open class BottomBannerViewController : UIViewController, NavigationComponent
-
See moreCarPlayMapViewController
is responsible for administering the Mapbox map, the interface styles and the map template buttons to display on CarPlay.Declaration
Swift
@objc(MBCarPlayMapViewController) public class CarPlayMapViewController : UIViewController
-
CarPlaySearchController
is the main object responsible for managing the search feature on CarPlay.Messages declared in the
CPApplicationDelegate
protocol should be sent to this object in the containing application’s application delegate. ImplementCarPlaySearchControllerDelegate
in the containing application and assign an instance to thedelegate
property of yourCarPlaySearchController
instance.Note
It is very important you have a singleCarPlaySearchController
instance at any given time.Declaration
Swift
@objc(MBCarPlaySearchController) public class CarPlaySearchController : NSObject
-
CarPlay support requires iOS 12.0 or above and the CarPlay framework.
-
A single feedback item displayed on an instance of
See moreFeedbackViewController
.Declaration
Swift
@objc(MBFeedbackItem) public class FeedbackItem : NSObject
-
A view controller containing a grid of buttons the user can use to denote an issue their current navigation experience.
See moreDeclaration
Swift
@objc(MBFeedbackViewController) public class FeedbackViewController : UIViewController, DismissDraggable, UIGestureRecognizerDelegate
-
GenericRouteShield
is a class to render routes that do not have route-shields.Declaration
Swift
public class GenericRouteShield : StylableView
-
See moreMapboxVoiceController
extends the defaultRouteVoiceController
by providing a more robust speech synthesizer via the Mapbox Speech API.RouteVoiceController
will be used as a fallback during poor network conditions.Declaration
Swift
@objc(MBMapboxVoiceController) open class MapboxVoiceController : RouteVoiceController, AVAudioPlayerDelegate
-
Customization options for the turn-by-turn navigation user experience in a
NavigationViewController
.A navigation options object is where you place customized components that the navigation view controller uses during its lifetime, such as styles or voice controllers. You would likely use this class if you need to specify a Mapbox access token programmatically instead of in the Info.plist file.
Note
NavigationOptions
is designed to be used with theNavigationViewController
class to customize the user experience. To specify criteria when calculating routes, use theNavigationRouteOptions
class.Declaration
Swift
@objc(MBNavigationOptions) open class NavigationOptions : NSObject, NavigationCustomizable
-
A view that represents the root view of the MapboxNavigation drop-in UI.
Components
- InstructionsBannerView
- InformationStackView
- BottomBannerView
- ResumeButton
- WayNameLabel
- FloatingStackView
- NavigationMapView
+--------------------+ | 1 | +--------------------+ | 2 | +----------------+---+ | | | | | 6 | | | | | 7 +---+ | | | | | | +------------+ | | 4 || 5 | | +------------+-------+ | 3 | +--------------------+
Declaration
Swift
@IBDesignable @objc(MBNavigationView) open class NavigationView : UIView
-
:nodoc
Declaration
Swift
@objc(MBStylableView) open class StylableView : UIView
-
A view representing the user’s location on screen.
See moreDeclaration
Swift
@objc(MBUserPuckCourseView) public class UserPuckCourseView : UIView, UserCourseView